Calibrating charge mismatch in a baseline correction circuit

ABSTRACT

Various embodiments provide a processing module that calibrates a current-mode baseline correction system to account for features in an input device that lead to “offset” in output of a charge integrator used for sensing presence of an input object. The offset is a difference between a common mode voltage, which is the average voltage output of the charge integrator over a sensing cycle and a mid-rail voltage midway between high and low power supply voltages. Calibration is performed by adjusting an N-side and/or P-side current flow duration parameter until common mode voltage falls within a low offset window in which the offset is deemed to be sufficiently close to the mid-rail voltage. The resulting duration parameters are stored and used for current-mode baseline corrections when operating an associated sensor electrode for capacitive sensing.

BACKGROUND

Field of the Disclosure

Embodiments generally relate to input sensing and, in particular, tocalibrating charge mismatch in a baseline correction circuit.

Description of the Related Art

Input devices including proximity sensor devices (also commonly calledtouchpads or touch sensor devices) are widely used in a variety ofelectronic systems. A proximity sensor device typically includes asensing region, often demarked by a surface, in which the proximitysensor device determines the presence, location, and/or motion of one ormore input objects. Proximity sensor devices may be used to provideinterfaces for the electronic system. For example, proximity sensordevices are often used as input devices for larger computing systems(such as opaque touchpads integrated in, or peripheral to, notebook ordesktop computers). Proximity sensor devices are also often used insmaller computing systems (such as touch screens integrated in cellularphones).

Such input devices include sensor electrodes that are driven with asignal for capacitive sensing. Processing circuitry processes the signalreceived from the sensor electrodes in order to determine capacitance ofthe sensor electrodes. A change in capacitance of the sensor electrodesindicates presence or absence of an input object proximate to a sensorelectrode as well as location of the input object.

Sensor electrodes form “capacitive pixels” with each other or with otherelements such as input objects. Each capacitive pixel has an associatedbaseline measurement, which is a measurement from the capacitive pixelthat a processing system measures with no input object in the sensingregion. An input device performs baselining operations to account forvariations or defects in the input device that may cause these baselinemeasurements to deviate from what is desired.

Baseline correction is usually achieved by adding or subtracting acertain amount of the charge received by processing circuitry when anassociated sensor electrode is driven for capacitive sensing, such thatan expected nominal output is obtained from the processing circuitry.One type of baseline operation, a current-mode baseline operation,adjusts the amount of current over a certain duration of time. Becauseof variations in manufacturing processes related to the baselinecircuitry, current-mode baseline operations may introduce a “common modevoltage offset” into a signal associated with the processing circuitry.A common mode voltage offset is a difference between the average of theoutput signal over a sensing cycle and a value that is deemed to be a“zeroed” value (such as a mid-rail voltage). This common mode voltageoffset results in a reduced dynamic range of the processing circuitry,which may reduce the range of input signals over which the input devicemay operate, thus reducing the ability to sense the presence of an inputobject.

SUMMARY

A processing system for calibrating current-mode baseline operations isprovided. The processing system includes a charge integrator coupled toa sensor electrode configured to be driven with a sensing signal forcapacitive sensing. The processing system also includes a baseline unitconfigured to flow first current to the charge integrator for a firstduration during a first period of a cycle of the sensing signal and toflow second current to the charge integrator for a second durationduring a second period of the cycle of the sensing signal. Theprocessing system further includes a calibration unit configured todetermine values for one or more of the first duration and the secondduration at which a common mode voltage of the charge integrator iswithin a prescribed range.

A method for calibrating current-mode baseline operations is alsoprovided. The method includes driving a sensor electrode coupled to acharge integrator with a signal. The method also includes flowing firstcurrent to the charge integrator for a first duration during a firstperiod of a cycle of the sensing signal. The method further includesflowing second current to the charge integrator for a second durationduring a second period of the cycle of the sensing signal. The methodalso includes determining values for one or more of the first durationand the second duration at which a common mode voltage of the chargeintegrator is within a prescribed range.

An input device is also provided. The input device includes a pluralityof sensor electrodes configured to be driven for capacitive sensing. Theinput device also includes a processing system. The processing systemincludes a charge integrator coupled to a sensor electrode of theplurality of sensor electrodes configured to be driven with a sensingsignal for capacitive sensing. The processing system also includes abaseline unit configured to flow first current to the charge integratorfor a first duration during a first period of a cycle of the sensingsignal and to flow second current to the charge integrator for a secondduration during a second period of the cycle of the sensing signal. Theprocessing system further includes a calibration unit configured todetermine values for one or more of the first duration and the secondduration at which a common mode voltage of the charge integrator iswithin a prescribed range.

BRIEF DESCRIPTION OF THE DRAWINGS

So that the manner in which the above recited features of embodimentscan be understood in detail, a more particular description ofembodiments, briefly summarized above, may be had by reference toembodiments, some of which are illustrated in the appended drawings. Itis to be noted, however, that the appended drawings illustrate onlytypical embodiments and are therefore not to be considered limiting ofscope, for other effective embodiments may be admitted.

FIG. 1 is a block diagram of a system that includes an input deviceaccording to an example.

FIG. 2A is a block diagram depicting a capacitive sensor deviceaccording to an example.

FIG. 2B is a block diagram depicting another capacitive sensor deviceaccording to an example.

FIG. 3 is a schematic diagram of a processing module for processingsignals received from a sensor electrode, according to an example.

FIGS. 4A and 4B illustrate graphs that show the effect of varyingcurrent flow duration parameters in the context of performing capacitivesensing, according to an example.

FIG. 5 is a graph that illustrates a technique for calibrating theprocessing module of FIG. 3, according to an example.

FIG. 6 is a flow chart of a method for operating the processing modulein calibration mode, according to an example.

FIG. 7 is a flow chart of a method for operating the processing modulein sensing mode, according to an example.

To facilitate understanding, identical reference numerals have beenused, where possible, to designate identical elements that are common tothe figures. It is contemplated that elements of one embodiment may bebeneficially incorporated in other embodiments.

DETAILED DESCRIPTION

The following detailed description is merely exemplary in nature and isnot intended to limit the embodiments or the application and uses ofsuch embodiments. Furthermore, there is no intention to be bound by anyexpressed or implied theory presented in the preceding technical field,background, brief summary or the following

Various embodiments provide a processing module that calibrates acurrent-mode baseline correction system to account for features in aninput device that lead to “offset” in output of a charge integrator usedfor sensing presence of an input object. In some embodiments, the offsetis a difference between a common mode voltage, which is the averagevoltage output of the charge integrator over a sensing cycle and amid-rail voltage midway between high and low power supply voltages.Calibration may be performed by adjusting an N-side and/or P-sidecurrent flow duration parameter until common mode voltage falls within alow offset window in which the offset is deemed to be sufficiently closeto the mid-rail voltage. The resulting duration parameters are storedand used for current-mode baseline corrections when operating anassociated sensor electrode for capacitive sensing. Because the offsetdescribed above contributes to reduced dynamic range of sensingcircuitry, the disclosed embodiments improve the dynamic range of thecapacitive sensing system.

Turning now to the figures, FIG. 1 is a block diagram of an exemplaryinput device 100, in accordance with embodiments of the invention. Theinput device 100 may be configured to provide input to an electronicsystem (not shown). As used in this document, the term “electronicsystem” (or “electronic device”) broadly refers to any system capable ofelectronically processing information. Some non-limiting examples ofelectronic systems include personal computers of all sizes and shapes,such as desktop computers, laptop computers, netbook computers, tablets,web browsers, e-book readers, and personal digital assistants (PDAs).Additional example electronic systems include composite input devices,such as physical keyboards that include input device 100 and separatejoysticks or key switches. Further example electronic systems includeperipherals such as data input devices (including remote controls andmice), and data output devices (including display screens and printers).Other examples include remote terminals, kiosks, and video game machines(e.g., video game consoles, portable gaming devices, and the like).Other examples include communication devices (including cellular phones,such as smart phones), and media devices (including recorders, editors,and players such as televisions, set-top boxes, music players, digitalphoto frames, and digital cameras). Additionally, the electronic systemcould be a host or a slave to the input device.

The input device 100 can be implemented as a physical part of theelectronic system or can be physically separate from the electronicsystem. As appropriate, the input device 100 may communicate with partsof the electronic system using any one or more of the following: buses,networks, and other wired or wireless interconnections. Examples includeI²C, SPI, PS/2, Universal Serial Bus (USB), Bluetooth, RF, and IRDA.

In FIG. 1, the input device 100 is shown as a proximity sensor device(also often referred to as a “touchpad” or a “touch sensor device”)configured to sense input provided by one or more input objects 140 in asensing region 120. Example input objects include fingers and styli, asshown in FIG. 1.

Sensing region 120 encompasses any space above, around, in, and/or nearthe input device 100 in which the input device 100 is able to detectuser input (e.g., user input provided by one or more input objects 140).The sizes, shapes, and locations of particular sensing regions may varywidely from embodiment to embodiment. In some embodiments, the sensingregion 120 extends from a surface of the input device 100 in one or moredirections into space until signal-to-noise ratios prevent sufficientlyaccurate object detection. The distance to which this sensing region 120extends in a particular direction, in various embodiments, may be on theorder of less than a millimeter, millimeters, centimeters, or more, andmay vary significantly with the type of sensing technology used and theaccuracy desired. Thus, some embodiments sense input that comprises nocontact with any surfaces of the input device 100, contact with an inputsurface (e.g., a touch surface) of the input device 100, contact with aninput surface of the input device 100 coupled with some amount ofapplied force or pressure, and/or a combination thereof. In variousembodiments, input surfaces may be provided by surfaces of casingswithin which the sensor electrodes reside, by face sheets applied overthe sensor electrodes or any casings, etc. In some embodiments, thesensing region 120 has a rectangular shape when projected onto an inputsurface of the input device 100.

The input device 100 may utilize any combination of sensor componentsand sensing technologies to detect user input in the sensing region 120.The input device 100 comprises one or more sensing elements fordetecting user input. As several non-limiting examples, the input device100 may use capacitive, elastive, resistive, inductive, magnetic,acoustic, ultrasonic, and/or optical techniques. Some implementationsare configured to provide images that span one, two, three, or higherdimensional spaces. Some implementations are configured to provideprojections of input along particular axes or planes. In some resistiveimplementations of the input device 100, a flexible and conductive firstlayer is separated by one or more spacer elements from a conductivesecond layer. During operation, one or more voltage gradients arecreated across the layers. Pressing the flexible first layer may deflectit sufficiently to create electrical contact between the layers,resulting in voltage outputs reflective of the point(s) of contactbetween the layers. These voltage outputs may be used to determinepositional information.

In some inductive implementations of the input device 100, one or moresensing elements pick up loop currents induced by a resonating coil orpair of coils. Some combination of the magnitude, phase, and frequencyof the currents may then be used to determine positional information.

In some capacitive implementations of the input device 100, voltage orcurrent is applied to create an electric field. Nearby input objectscause changes in the electric field and produce detectable changes incapacitive coupling that may be detected as changes in voltage, current,or the like.

Some capacitive implementations utilize arrays or other regular orirregular patterns of capacitive sensing elements to create electricfields. In some capacitive implementations, separate sensing elementsmay be ohmically shorted together to form larger sensor electrodes. Somecapacitive implementations utilize resistive sheets, which may beuniformly resistive.

Some capacitive implementations utilize “self capacitance” (or “absolutecapacitance”) sensing methods based on changes in the capacitivecoupling between sensor electrodes and an input object. In variousembodiments, an input object near the sensor electrodes alters theelectric field near the sensor electrodes, changing the measuredcapacitive coupling. In one implementation, an absolute capacitancesensing method operates by modulating sensor electrodes with respect toa reference voltage (e.g., system ground) and by detecting thecapacitive coupling between the sensor electrodes and input objects.

Some capacitive implementations utilize “mutual capacitance” (or“transcapacitance”) sensing methods based on changes in the capacitivecoupling between sensor electrodes. In various embodiments, an inputobject near the sensor electrodes alters the electric field between thesensor electrodes, changing the measured capacitive coupling. In oneimplementation, a transcapacitive sensing method operates by detectingthe capacitive coupling between one or more transmitter sensorelectrodes (also “transmitter electrodes” or “transmitters”) and one ormore receiver sensor electrodes (also “receiver electrodes” or“receivers”). Transmitter sensor electrodes may be modulated relative toa reference voltage (e.g., system ground) to transmit transmittersignals. Receiver sensor electrodes may be held substantially constantrelative to the reference voltage to facilitate receipt of resultingsignals. A resulting signal may comprise effect(s) corresponding to oneor more transmitter signals and/or to one or more sources ofenvironmental interference (e.g., other electromagnetic signals). Sensorelectrodes may be dedicated transmitters or receivers, or sensorelectrodes may be configured to both transmit and receive.Alternatively, the receiver electrodes may be modulated relative toground.

In FIG. 1, a processing system 110 is shown as part of the input device100. The processing system 110 is configured to operate the hardware ofthe input device 100 to detect input in the sensing region 120. Theprocessing system 110 comprises parts of, or all of, one or moreintegrated circuits (ICs) and/or other circuitry components. Forexample, a processing system for a mutual capacitance sensor device maycomprise transmitter circuitry configured to transmit signals withtransmitter sensor electrodes and/or receiver circuitry configured toreceive signals with receiver sensor electrodes. In some embodiments,the processing system 110 also comprises electronically-readableinstructions, such as firmware code, software code, and/or the like. Insome embodiments, components composing the processing system 110 arelocated together, such as near sensing element(s) of the input device100. In other embodiments, components of processing system 110 arephysically separate with one or more components close to sensingelement(s) of input device 100 and one or more components elsewhere. Forexample, the input device 100 may be a peripheral coupled to a desktopcomputer, and the processing system 110 may comprise software configuredto run on a central processing unit of the desktop computer and one ormore ICs (perhaps with associated firmware) separate from the centralprocessing unit. As another example, the input device 100 may bephysically integrated in a phone, and the processing system 110 maycomprise circuits and firmware that are part of a main processor of thephone. In some embodiments, the processing system 110 is dedicated toimplementing the input device 100. In other embodiments, the processingsystem 110 also performs other functions, such as operating displayscreens, driving haptic actuators, etc.

The processing system 110 may be implemented as a set of modules thathandle different functions of the processing system 110. Each module maycomprise circuitry that is a part of the processing system 110,firmware, software, or a combination thereof. In various embodiments,different combinations of modules may be used. Example modules includehardware operation modules for operating hardware such as sensorelectrodes and display screens, data processing modules for processingdata such as sensor signals and positional information, and reportingmodules for reporting information. Further example modules includesensor operation modules configured to operate sensing element(s) todetect input, identification modules configured to identify gesturessuch as mode changing gestures, and mode changing modules for changingoperation modes.

In some embodiments, the processing system 110 responds to user input(or lack of user input) in the sensing region 120 directly by causingone or more actions. Example actions include changing operation modes,as well as GUI actions such as cursor movement, selection, menunavigation, and other functions. In some embodiments, the processingsystem 110 provides information about the input (or lack of input) tosome part of the electronic system (e.g., to a central processing systemof the electronic system that is separate from the processing system110, if such a separate central processing system exists). In someembodiments, some part of the electronic system processes informationreceived from the processing system 110 to act on user input, such as tofacilitate a full range of actions, including mode changing actions andGUI actions.

For example, in some embodiments, the processing system 110 operates thesensing element(s) of the input device 100 to produce electrical signalsindicative of input (or lack of input) in the sensing region 120. Theprocessing system 110 may perform any appropriate amount of processingon the electrical signals in producing the information provided to theelectronic system. For example, the processing system 110 may digitizeanalog electrical signals obtained from the sensor electrodes. Asanother example, the processing system 110 may perform filtering orother signal conditioning. As yet another example, the processing system110 may subtract or otherwise account for a baseline, such that theinformation reflects a difference between the electrical signals and thebaseline. As yet further examples, the processing system 110 maydetermine positional information, recognize inputs as commands,recognize handwriting, and the like.

“Positional information” as used herein broadly encompasses absoluteposition, relative position, velocity, acceleration, and other types ofspatial information. Exemplary “zero-dimensional” positional informationincludes near/far or contact/no contact information. Exemplary“one-dimensional” positional information includes positions along anaxis. Exemplary “two-dimensional” positional information includesmotions in a plane. Exemplary “three-dimensional” positional informationincludes instantaneous or average velocities in space. Further examplesinclude other representations of spatial information. Historical dataregarding one or more types of positional information may also bedetermined and/or stored, including, for example, historical data thattracks position, motion, or instantaneous velocity over time.

In some embodiments, the input device 100 is implemented with additionalinput components that are operated by the processing system 110 or bysome other processing system. These additional input components mayprovide redundant functionality for input in the sensing region 120 orsome other functionality. FIG. 1 shows buttons 130 near the sensingregion 120 that can be used to facilitate selection of items using theinput device 100. Other types of additional input components includesliders, balls, wheels, switches, and the like. Conversely, in someembodiments, the input device 100 may be implemented with no other inputcomponents.

In some embodiments, the input device 100 comprises a touch screeninterface, and the sensing region 120 overlaps at least part of anactive area of a display screen. For example, the input device 100 maycomprise substantially transparent sensor electrodes overlaying thedisplay screen and provide a touch screen interface for the associatedelectronic system. The display screen may be any type of dynamic displaycapable of displaying a visual interface to a user, and may include anytype of light emitting diode (LED), organic LED (OLED), cathode ray tube(CRT), liquid crystal display (LCD), plasma, electroluminescence (EL),or other display technology. The input device 100 and the display screenmay share physical elements. For example, some embodiments may utilizesome of the same electrical components for displaying and sensing. Asanother example, the display screen may be operated in part or in totalby the processing system 110.

It should be understood that while many embodiments of the invention aredescribed in the context of a fully functioning apparatus, themechanisms of the present invention are capable of being distributed asa program product (e.g., software) in a variety of forms. For example,the mechanisms of the present invention may be implemented anddistributed as a software program on information bearing media that arereadable by electronic processors (e.g., non-transitorycomputer-readable and/or recordable/writable information bearing mediareadable by the processing system 110). Additionally, the embodiments ofthe present invention apply equally regardless of the particular type ofmedium used to carry out the distribution. Examples of non-transitory,electronically readable media include various discs, memory sticks,memory cards, memory modules, and the like. Electronically readablemedia may be based on flash, optical, magnetic, holographic, or anyother storage technology.

FIG. 2A is a block diagram depicting a capacitive sensor device 200Aaccording to an example. The capacitive sensor device 200A comprises anexample implementation of the input device 100 shown in FIG. 1. Thecapacitive sensor device 200A includes a sensor electrode collection 208coupled to an example implementation of the processing system 110(referred to as “the processing system 110A”). As used herein, generalreference to the processing system 110 is a reference to the processingsystem described in FIG. 1 or any other embodiment thereof describedherein (e.g., the processing system 110A, 110B, etc.).

The sensor electrode collection 208 is disposed on a substrate 202 toprovide the sensing region 120. The sensor electrode collection 208includes sensor electrodes disposed on the substrate 202. In the presentexample, the sensor electrode collection 208 includes two pluralities ofsensor electrodes 220-1 through 220-N (collectively “sensor electrodes220”), and 230-1 through 230-M (collectively “sensor electrodes 230”),where M and N are integers greater than zero. The sensor electrodes 220and 230 are separated by a dielectric (not shown). The sensor electrodes220 and the sensor electrodes 230 can be non-parallel. In an example,the sensor electrodes 220 are disposed orthogonally with the sensorelectrodes 230.

In some examples, the sensor electrodes 220 and the sensor electrodes230 can be disposed on separate layers of the substrate 202. In otherexamples, the sensor electrodes 220 and the sensor electrodes 230 can bedisposed on a single layer of the substrate 202. While the sensorelectrodes are shown disposed on a single substrate 202, in someembodiments, the sensor electrodes can be disposed on more than onesubstrate. For example, some sensor electrodes can be disposed on afirst substrate, and other sensor electrodes can be disposed on a secondsubstrate adhered to the first substrate.

In the present example, the sensor electrode collection 208 is shownwith the sensor electrodes 220, 230 generally arranged in a rectangulargrid of intersections of orthogonal sensor electrodes. It is to beunderstood that the sensor electrode collection 208 is not limited tosuch an arrangement, but instead can include numerous sensor patterns.Although the sensor electrode collection 208 is depicted as rectangular,the sensor electrode collection 208 can have other shapes, such as acircular shape.

As discussed below, the processing system 110A can operate the sensorelectrodes 220, 230 according to a plurality of excitation schemes,including excitation scheme(s) for mutual capacitance sensing(“transcapacitive sensing”) and/or self-capacitance sensing (“absolutecapacitive sensing”). In a transcapacitive excitation scheme, theprocessing system 110A drives the sensor electrodes 230 with transmittersignals (the sensor electrodes 230 are “transmitter electrodes”), andreceives resulting signals from the sensor electrodes 220 (the sensorelectrodes 220 are “receiver electrodes”). In some embodiments, sensorelectrodes 220 may be transmitter electrodes and sensor electrodes 230may be receiver electrodes. The sensor electrodes 230 can have the sameor different geometry as the sensor electrodes 220. In an example, thesensor electrodes 230 are wider and more closely distributed than thesensor electrodes 220, which are thinner and more sparsely distributed.Similarly, in an embodiment, sensor electrodes 220 may be wider and/ormore sparsely distributed. Alternatively, the sensor electrodes 220, 230can have the same width and/or the same distribution.

The sensor electrodes 220 and the sensor electrodes 230 are coupled tothe processing system 110A by conductive routing traces 204 andconductive routing traces 206, respectively. The processing system 110Ais coupled to the sensor electrodes 220, 230 through the conductiverouting traces 204, 206 to implement the sensing region 120 for sensinginputs. Each of the sensor electrodes 220 can be coupled to at least onerouting trace of the routing traces 206. Likewise, each of the sensorelectrodes 230 can be coupled to at least one routing trace of therouting traces 204.

FIG. 2B is a block diagram depicting a capacitive sensor device 200Baccording to an example. The capacitive sensor device 200B comprisesanother example implementation of the input device 100 shown in FIG. 1.In the present example, the sensor electrode collection 208 includes aplurality of sensor electrodes 210 _(1,1) through 210 _(J,K), where Jand K are integers (collectively “sensor electrodes 210”). The sensorelectrodes 210 are capacitively coupled to a grid electrode 214. Thesensor electrodes 210 are ohmically isolated from each other and thegrid electrode 214. The sensor electrodes 210 can be separated from thegrid electrode 214 by a gap 216. In the present example, the sensorelectrodes 210 are arranged in a rectangular matrix pattern, where atleast one of J or K is greater than zero. The sensor electrodes 210 canbe arranged in other patterns, such as polar arrays, repeating patterns,non-repeating patterns, or like type arrangements. Similar to thecapacitive sensor device 200A, the processing system 110A can operatethe sensor electrodes 210 and the grid electrode 214 according to aplurality of excitation schemes, including excitation scheme(s) fortranscapacitive sensing and/or absolute capacitive sensing.

In some examples, the sensor electrodes 210 and the grid electrode 214can be disposed on separate layers of the substrate 202. In otherexamples, the sensor electrodes 210 and the grid electrode 214 can bedisposed on a single layer of the substrate 202. The sensor electrodes210 can be on the same and/or different layers as the sensor electrodes220 and the sensor electrodes 230. While the sensor electrodes are showndisposed on a single substrate 202, in some embodiments, the sensorelectrodes can be disposed on more than one substrate. For example, somesensor electrodes can be disposed on a first substrate, and other sensorelectrodes can be disposed on a second substrate adhered to the firstsubstrate.

The sensor electrodes 210 are coupled to the processing system 110A byconductive routing traces 212. The processing system 110A can also becoupled to the grid electrode 214 through one or more routing traces(not shown for clarity). The processing system 110A is coupled to thesensor electrodes 210 through the conductive routing traces 212 toimplement the sensing region 120 for sensing inputs.

Referring to FIGS. 2A and 2B, the capacitive sensor device 200A or 200Bcan be utilized to communicate user input (e.g., a user's finger, aprobe such as a stylus, and/or some other external input object) to anelectronic system (e.g., computing device or other electronic device).For example, the capacitive sensor device 200A or 200B can beimplemented as a capacitive touch screen device that can be placed overan underlying image or information display device (not shown). In thismanner, a user would view the underlying image or information display bylooking through substantially transparent elements in the sensorelectrode collection 208. When implemented in a touch screen, thesubstrate 202 can include at least one substantially transparent layer(not shown). The sensor electrodes and the conductive routing traces canbe formed of substantially transparent conductive material. Indium tinoxide (ITO) and/or thin, barely visible wires are but two of manypossible examples of substantially transparent material that can be usedto form the sensor electrodes and/or the conductive routing traces. Inother examples, the conductive routing traces can be formed ofnon-transparent material, and then hidden in a border region (not shown)of the sensor electrode collection 208.

In another example, the capacitive sensor device 200A or 200B can beimplemented as a capacitive touchpad, slider, button, or othercapacitance sensor. For example, the substrate 202 can be implementedwith, but not limited to, one or more clear or opaque materials.Likewise, clear or opaque conductive materials can be utilized to formsensor electrodes and/or conductive routing traces for the sensorelectrode collection 208.

In general, the processing system 110A excites or drives sensingelements of the sensor electrode collection 208 with a sensing signaland measures an induced or resulting signal that includes the sensingsignal and effects of input in the sensing region 120. The terms“excite” and “drive” as used herein encompasses controlling someelectrical aspect of the driven element. For example, it is possible todrive current through a wire, drive charge into a conductor, drive asubstantially constant or varying voltage waveform onto an electrode,etc. A sensing signal can be constant, substantially constant, orvarying over time, and generally includes a shape, frequency, amplitude,and phase. A sensing signal can be referred to as an “active signal” asopposed to a “passive signal,” such as a ground signal or otherreference signal. A sensing signal can also be referred to as a“transmitter signal” when used in transcapacitive sensing, or an“absolute sensing signal” or “modulated signal” when used in absolutesensing.

In an example, the processing system 110A drives sensing element(s) ofthe sensor electrode collection 208 with a voltage and senses resultingrespective charge on sensing element(s). That is, the sensing signal isa voltage signal and the resulting signal is a charge signal (e.g., asignal indicative of accumulated charge, such as an integrated currentsignal). Capacitance is proportional to applied voltage and inverselyproportional to accumulated charge. The processing system 110A candetermine measurement(s) of capacitance from the sensed charge. Inanother example, the processing system 110A drives sensing element(s) ofthe sensor electrode collection 208 with charge and senses resultingrespective voltage on sensing element(s). That is, the sensing signal isa signal to cause accumulation of charge (e.g., current signal) and theresulting signal is a voltage signal. The processing system 110A candetermine measurement(s) of capacitance from the sensed voltage. Ingeneral, the term “sensing signal” is meant to encompass both drivingvoltage to sense charge and driving charge to sense voltage, as well asany other type of signal that can be used to obtain indicia ofcapacitance. “Indicia of capacitance” include measurements of charge,current, voltage, and the like, from which capacitance can be derived.

The processing system 110A can include a sensor module 240 and adetermination module 260. The sensor module 240 and the determinationmodule 260 comprise modules that perform different functions of theprocessing system 110A. In other examples, different configurations ofone or more modules can perform the functions described herein. Thesensor module 240 and the determination module 260 can include circuitry275 and can also include firmware, software, or a combination thereofoperating in cooperation with the circuitry 275.

The sensor module 240 selectively drives sensing signal(s) on one ormore sensing elements of the sensor electrode collection 208 over one ormore cycles (“excitation cycles”) in accordance with one or more schemes(“excitation schemes”). During each excitation cycle, the sensor module240 can selectively sense resulting signal(s) from one or more sensingelements of the sensor electrode collection 208. Each excitation cyclehas an associated time period during which sensing signals are drivenand resulting signals measured.

In one type of excitation scheme, the sensor module 240 can selectivelydrive sensing elements of the sensor electrode collection 208 forabsolute capacitive sensing. In absolute capacitive sensing, the sensormodule 240 drives selected sensing element(s) with an absolute sensingsignal and senses resulting signal(s) from the selected sensingelement(s). In such an excitation scheme, measurements of absolutecapacitance between the selected sensing element(s) and input object(s)are determined from the resulting signal(s). In an example, the sensormodule 240 can drive selected sensor electrodes 220, and/or selectedsensor electrodes 230, with an absolute sensing signal. In anotherexample, the sensor module 240 can drive selected sensor electrodes 210with an absolute sensing signal.

In another type of excitation scheme, the sensor module 240 canselectively drive sensing elements of the sensor electrode collection208 for transcapacitive sensing. In transcapacitive sensing, the sensormodule 240 drives selected transmitter sensor electrodes withtransmitter signal(s) and senses resulting signals from selectedreceiver sensor electrodes. In such an excitation scheme, measurementsof transcapacitance between transmitter and receiver electrodes aredetermined from the resulting signals. In an example, the sensor module240 can drive the sensor electrodes 230 with transmitter signal(s) andreceive resulting signals on the sensor electrodes 220. In anotherexample, the sensor module 240 can drive selected sensor electrodes 210with transmitter signal(s), and receive resulting signals from others ofthe sensor electrodes 210.

In any excitation cycle, the sensor module 240 can drive sensingelements of the sensor electrode collection 208 with other signals,including reference signals and guard signals. That is, those sensingelements of the sensor electrode collection 208 that are not driven witha sensing signal, or sensed to receive resulting signals, can be drivenwith a reference signal, a guard signal, or left floating (i.e., notdriven with any signal). A reference signal can be a ground signal(e.g., system ground) or any other constant or substantially constantvoltage signal. A guard signal can be a signal that is similar or thesame in at least one of shape, amplitude, frequency, or phase of atransmitter signal.

“System ground” may indicate a common voltage shared by systemcomponents. For example, a capacitive sensing system of a mobile phonecan, at times, be referenced to a system ground provided by the phone'spower source (e.g., a charger or battery). The system ground may not befixed relative to earth or any other reference. For example, a mobilephone on a table usually has a floating system ground. A mobile phonebeing held by a person who is strongly coupled to earth ground throughfree space may be grounded relative to the person, but the person-groundmay be varying relative to earth ground. In many systems, the systemground is connected to, or provided by, the largest area electrode inthe system. The capacitive sensor device 200A or 200B can be locatedproximate to such a system ground electrode (e.g., located above aground plane or backplane).

The determination module 260 performs capacitance measurements based onresulting signals obtained by the sensor module 240. The capacitancemeasurements can include changes in capacitive couplings betweenelements (also referred to as “changes in capacitance”). For example,the determination module 260 can determine baseline measurements ofcapacitive couplings between elements without the presence of inputobject(s). The determination module 260 can then combine the baselinemeasurements of capacitive couplings with measurements of capacitivecouplings in the presence of input object(s) to determine changes incapacitive couplings.

In an example, the determination module 260 can perform a plurality ofcapacitance measurements associated with specific portions of thesensing region 120 as “capacitive pixels” to create a “capacitive image”or “capacitive frame.” A capacitive pixel of a capacitive imagerepresents a location within the sensing region 120 in which acapacitive coupling can be measured using sensing elements of the sensorelectrode collection 208. For example, a capacitive pixel can correspondto a transcapacitive coupling between a sensor electrode 220 and asensor electrode 230 affected by input object(s). In another example, acapacitive pixel can correspond to an absolute capacitance of a sensorelectrode 210. The determination module 260 can determine an array ofcapacitive coupling changes using the resulting signals obtained by thesensor module 240 to produce an x-by-y array of capacitive pixels thatform a capacitive image. The capacitive image can be obtained usingtranscapacitive sensing (e.g., transcapacitive image), or obtained usingabsolute capacitive sensing (e.g., absolute capacitive image). In thismanner, the processing system 110A can capture a capacitive image thatis a snapshot of the response measured in relation to input object(s) inthe sensing region 120. A given capacitive image can include all of thecapacitive pixels in the sensing region, or only a subset of thecapacitive pixels.

In another example, the determination module 260 can perform a pluralityof capacitance measurements associated with a particular axis of thesensing region 120 to create a “capacitive profile” along that axis. Forexample, the determination module 260 can determine an array of absolutecapacitive coupling changes along an axis defined by the sensorelectrodes 220 and/or the sensor electrodes 230 to produce capacitiveprofile(s). The array of capacitive coupling changes can include anumber of points less than or equal to the number of sensor electrodesalong the given axis.

Measurement(s) of capacitance by the processing system 110A, such ascapacitive image(s) or capacitive profile(s), enable the sensing ofcontact, hovering, or other user input with respect to the formedsensing regions by the sensor electrode collection 208. Thedetermination module 260 can utilize the measurements of capacitance todetermine positional information with respect to a user input relativeto the sensing regions formed by the sensor electrode collection 208.The determination module 260 can additionally or alternatively use suchmeasurement(s) to determine input object size and/or input object type.While FIG. 2A and FIG. 2B illustrate several example embodiments, it isto be understood that the system and method described herein can be usedin a variety of additional embodiments which utilize capacitive sensing.

FIG. 3 is an illustration of a processing module 300 for processingsignals received from a sensor electrode 318, according to an example.The processing module 300 may be partially or fully included inprocessing system 110 of FIGS. 1-2B. The processing module 300 includesa current-mode baseline system 301, a charge integrator 308, and acalibration module 310. Current-mode baseline system 301 includes acurrent reference 302, a current conveyor core 304, and a current mirror306 with NMOS transistors coupled to ground and PMOS transistors coupledto power supply. The charge integrator 308 includes an operationalamplifier 312, a feedback capacitor 314 and a reset switch 316. Atransmitter electrode 319 is illustrated and operates to drive sensorelectrode 318 with a signal when operating in transcapacitive sensingmode. In absolute sensing mode, signal generator 322 drives a signalonto non-inverting input of operational amplifier 312 to drive sensorelectrode 318 for capacitive sensing. Calibration module 310 receivesoutput from charge integrator 308 and adjusts timings (also referred toherein as “duration parameters,” or individually as a P-type durationparameter “P_DUR” and an N-type duration parameter “N_DUR”) for thecurrent-mode baseline system 301. Background capacitance 320 isrepresented by the capacitor marked “Cb” and represents environmentalcapacitance (e.g., capacitance to other elements of input device 100 orof environmental objects for which capacitive sensing is not beingperformed). This background capacitance 320 is one of the factors thatbaselining accounts for.

Processing module 300 operates in one of two modes: a sensing mode and acalibration mode. In the sensing mode, current-mode baseline system 301adds or removes current from charge integrator 308 (at the invertinginput) to perform baseline operations while processing system 110 drivessensor electrode 318 for capacitive sensing. Calibration module 310 setsthe amount of current flowed by current mirror 306 via P_DUR switch andN_DUR switch based on associated P_DUR and N_DUR parameters. In thecalibration mode, calibration module 310 works in conjunction withcurrent-mode baseline system 301 to determine the P_DUR and N_DURparameters to be used during sensing mode. The calibration mode may betriggered by powering input device 100 on. Alternatively, thecalibration mode may be performed any time a calibration is desired.

In greater detail, in the sensing mode, transmitter electrode 319 orsignal generator generates a driving signal to induce a signal in sensorelectrode 318. This signal causes a current flow at the inverting inputof operational amplifier 312. Without baselining, the current flow whenno input object 140 is near sensor electrode 318 would be dominated bythe background capacitance or sensor capacitance and make the inputdevice 100 insensitive to the small capacitance change induced by aninput object 140. An ideal baseline system would effectively removebackground or sensor capacitance, and perfectly “center” the output whenno input object 140 is near. The correction is usually not ideal for avariety of reasons, including variation in sensor electrode electricalor physical characteristics such as transistor mismatch across inputdevice 100, switch charge injection, charge integrator offset, or forother reasons. Current-mode baseline system 301 adjusts for thesevariations, so that the output from charge integrator 308 when no inputobject 140 is present is an expected value and is thus considered to bebaselined. Current-mode baseline system 301 makes these adjustments byflowing additional charge to or from charge integrator 308 during anappropriate portion of the sensing cycle. Related timing details,including an explanation of sensing cycles, are discussed in furtherdetail with respect to FIG. 4.

Current-mode baseline system 301 includes several components for flowingcharge in this manner. A current reference 302 generates a referencecurrent by applying a signal to a capacitor in series with a resistor.Current conveyor core 304 receives this reference current as input andreplicates and amplifies the reference current to current mirror 306.Although a current conveyor core 304 is shown, other circuits may beused to replicate the reference current for use in baselining differentsensor electrodes 318. Current mirror includes a P-side output and anN-side output, each gated by a respective switch. A switch for theP-side output flows additional current to charge integrator 308 whilesensor electrode 318 is drawing current from charge integrator 308. Aswitch for the N-side output draws additional current from chargeintegrator 308 while sensor electrode 318 is sourcing current. Theresult of these operations is to modify the signal output by chargeintegrator 308 in order to “baseline” that signal.

The N-side output and P-side output do not necessarily output the samecurrent to charge integrator 308. This difference may be caused by adifference in transistor characteristics, or for other reasons. Toaccount for this difference, the switches for the P-side output and/orthe N-side output are closed for an adjustable amount of time. Thelength of time over which the P-side switch is closed is indicated bythe parameter “P_DUR” and the length of time over which the N-sideswitch is closed is indicated by the parameter “N_DUR.” These parametersare determined by operating the current-mode baseline system 301 incalibration mode.

Input device may include multiple current mirrors 306 coupled to asingle current conveyor core 304. Each current mirror 306 may be coupledto a different “channel,” where the term “channel” refers to a receiverelectrode with transcapacitive sensing or a sensor electrode forself-capacitive sensing. N_DUR and P_DUR parameters may be determinedfor each channel and/or for each capacitive pixel in calibration mode.N_DUR and P_DUR parameters may alternatively be determined for groups ofchannels. A channel grouping scheme is described in more detail belowwith respect to FIG. 5.

FIGS. 4A and 4B illustrate graph 400 and graph 450 that show the effectof varying the N_DUR and P_DUR parameters in the context of performingcapacitive sensing, according to an example. Both graph 400 and graph450 include three plots, labeled “charge integrator output,” “P-side”and “N-side.” A single sensing cycle is shown, over which a sensorelectrode 318 is driven twice with opposite polarities. The P_DURparameter is uncalibrated in graph 400 and is calibrated in graph 450.Because the P_DUR parameter has been calibrated, the offset in graph 450is lower than in graph 400, which improves the dynamic range of theprocessing module 300.

Referring to FIGS. 3 and 4A together, during a reset period of a firstperiod of the sensing cycle, reset switch 316 resets feedback capacitor314. After the reset period, processing system 110 induces a signal onsensor electrode 318 for capacitive sensing. That signal causes acurrent flow from charge integrator 308, inducing charge integratoroutput as shown. The P-side switch of current mirror 306 is closed fortime P_DUR and thus provides current from current mirror 306 to chargeup the sensor capacitance. After time P_DUR, the P-side switch ofcurrent mirror 306 is open, thus preventing current from flowing fromcurrent mirror 306 to charge integrator 308 after that time. Chargeintegrator 308 continues to integrate charge from sensor electrode 318.

After the first period of the sensing cycle, a second period of thesensing cycle occurs. First, in a reset period, reset switch 316 resetsfeedback capacitor 314. After the reset period, processing system 110induces a signal on sensor electrode 318 for capacitive sensing. Thatsignal causes a current from sensor electrode 318, inducing chargeintegrator output as shown. The N-side switch of current mirror 306 isclosed for time N_DUR to sink the charge dumped by the sensorcapacitance. After time N_DUR, the N-side switch of current mirror 306is open, thus preventing current from flowing to current mirror 306 fromcharge integrator 308 after that time.

Because FIG. 4A illustrates uncalibrated current-mode baselinecorrection, there is an offset between the common-mode—voltagetheaverage voltage at the end of each of the half sensing cycles—and themiddle voltage that the charge integrator 308 is reset to when resetswitch 316 closes. This offset manifests as a reduction in dynamic rangeof the processing module 300.

FIG. 4B depicts a graph 450 that illustrates operation of processingmodule 300 after the P_DUR and N_DUR values have been calibrated incalibration mode. Operation is similar as with respect to FIG. 4A exceptthat P_DUR is calibrated and is longer in FIG. 4B than in FIG. 4A. Thislonger length results in a lower amplitude output of charge integrator308 during the first period of the sensing cycle, which lowers thecommon mode voltage to be closer to the middle voltage to which chargeintegrator 308 is reset when reset switch 316 closes. This reduces theoffset described above, which improves the dynamic range of processingmodule 300.

Note that the P_DUR and N_DUR parameters may correct for a mismatchbetween an N-type transistor and a P-type transistor of current mirror306. Specifically, because a mismatch would result in different amountsof current flowing through those transistors, adjusting the durationover which those transistors provide current to charge integrator 308corrects for this mismatch. The P_DUR and N_DUR parameters may alsocorrect for mismatches induced by other elements such as capacitancemode baseline capacitor 320, charge integrator 308, or other elements.

Note also that the parameters P_DUR and N_DUR may be stored as apercentage of a respective period of a sensing cycle. In one example,P_DUR may be 30%, which represents 30% of the time from beginning onereset of feedback capacitor 314 via reset switch 316 to beginning thenext reset of feedback capacitor 314 via reset switch 316. Theseparameters may be stored in registers accessible to control circuitryfor controlling the switches for P-type and N-type sides of currentmirror 306.

FIG. 5 is a graph 500 that illustrates a technique for calibratingprocessing module 300 of FIG. 3, according to an example. The graph 500includes several plots that illustrate the calibration technique: a plotlabeled P_DUR, a plot labeled common-mode voltage, and a plot labeled“outside window count.”

To calibrate processing module 300, calibration module 310 holds N_DURconstant and varies P_DUR within a duration parameter range during atesting period. In the example illustrated in FIG. 5, calibration module310 varies P_DUR by sweeping P_DUR from a maximum value to a minimumvalue. For each value of P_DUR, calibration module 310 causes sensorelectrode 318 to be driven with a signal for multiple sensing cycles.Each period of a sensing cycle in which sensor electrode 318 is drivenwith a signal, charge integrator 308 integrates charge received at theinverting input of operational amplifier 312 and outputs the integratedvalue to calibration module 310. For each sensing cycle, calibrationmodule 310 calculates the average value over that sensing cycle receivedfrom the charge integrator 308 (the “common mode voltage”) and detectswhether the common mode voltage is within a “low offset window.” Theaverage value is the average of two values: the output voltage at theend of the first period of the sensing cycle and the output voltage atthe end of the second period of the sensing cycle. The low offset windowis a range of values within which the offset described with reference toFIGS. 4A-4B is deemed to be low enough such that processing module 300is considered to be calibrated.

Note that for each value of P_DUR, the sensor electrode 318 is driven anumber of times (i.e., for multiple sensing cycles). The graph labeled“outside window count” indicates a count of the number of times that thecommon mode voltage is outside of the low offset window for anyparticular value of P_DUR. The reason this measurement is performedmultiple times for each value of P_DUR is to account for randomvariations induced by noise. Although described as being performed anumber of times for each value of P_DUR, in some embodiments, themeasurement may be performed only once for each value of P_DUR, in whichcase the outside window count would be only 0or 1.

After varying P_DUR within the duration parameter range and taking theassociated measurements, calibration module 310 identifies the value ofP_DUR for which the outside window count is the lowest. At this lowestpoint, the number of times that the common mode voltage falls outside ofthe low offset window is the lowest, meaning that for that value ofP_DUR, the common mode voltage is within the low offset window and isthus calibrated. Once the calibrated values of N_DUR and P_DUR areobtained, calibration module 310 stores these values in a storage areasuch as registers or the like, for use during the sensing mode.

Note that although P_DUR is described as being varied herein, whileN_DUR is held constant, N_DUR may instead be varied while P_DUR isconstant. Alternatively, both P_DUR and N_DUR may be varied.Additionally, although P_DUR is shown as varying linearly from oneextreme to the other, P_DUR may be varied in a different manner. Asearch such as a binary search may also be performed, which would takeadvantage of the fact that common mode voltage varies proportionately toP_DUR (or N_DUR). In some embodiments, the minimum and maximum valuesover which P_DUR (or N_DUR) vary are 15% and 45% of the period of thesensing cycle illustrated in FIG. 3 (i.e., the period from beginning onereset period to beginning the next reset period).

N_DUR and P_DUR parameters may alternatively or additionally bedetermined for groups of channels. The calibration technique illustratedin FIG. 5 would be performed for multiple channels and the results wouldcombined via a logical OR operation. More specifically, a particularduration parameter would be varied and processing system 110 would drivethe different sensor electrodes 318 of the different channels with asignal for multiple cycles for each value of the duration parameter. Foreach cycle, calibration module 310 would compare the common mode voltagefor that cycle to a low offset window, outputting a “0” if the commonmode voltage falls within that window and outputting a “1” if the commonmode voltage falls outside of that window. Calibration module 310 wouldperform a logical OR operation for each cycle and each channel. If thecommon mode voltage falls outside of the low offset window for anychannel, then the result of this logical OR operation would be a “1” andif the common mode voltage falls within the low offset window for allchannels, then the result of this logical OR operation would be a “0.”Calibration module 310 would record the count of the number of logical1's and would determine the calibrated value for the duration parameteras the duration parameter associated with the lowest count. Channelscould be grouped together in any way. In one example, channels near apower supply would be expected to be similarly affected by powersupply-related noise and could be calibrated together with the techniquejust described.

FIG. 6 is a flow chart of a method 600 for operating the processingmodule 300 in calibration mode, according to an example. Although themethod is described in conjunction with the system described withrespect to FIGS. 1-5, persons skilled in the art will understand thatany system configured to perform the method steps, in varioustechnically feasible alternative orders, falls within the scope of thepresent disclosure.

As shown, the method 600 starts at step 602, where calibration module310 selects a new duration parameter value for testing. The parametermay be either the N_DUR parameter or the P_DUR parameter describedabove. Calibration module 310 may select this duration parameter as partof a parameter variation scheme, such as varying the duration parameterlinearly, varying the duration parameter to performing a search, and thelike.

At step 604, processing system 110 drives the sensor electrode 318 forcapacitive sensing a number of times with the selected durationparameter. At step 606, charge integrator 308 integrates charge receivedfrom sensor electrode 318 each time sensor electrode 318 is driven forcapacitive sensing. At step 608, calibration module 310 determines thecommon mode voltage for each sensing period in which the sensorelectrode is driven. At step 610, calibration module 310 compares thecommon mode voltage with the low offset window and records a count ofthe number of times that the common mode voltage is within the lowoffset window.

At step 612, calibration module 310 determines whether testing iscomplete. Testing may be complete when all values within a particularrange of values for the duration parameter have been tested. Testing mayalso be complete when a binary search has found a duration parameter forwhich the integrated charge is within the low offset window. If testingis not complete, then the method 600 returns to step 602 and if testingis complete, then the method 600 proceeds to step 614. At step 614,calibration module 310 sets the duration parameter for use in sensingmode as the duration parameter for which the common mode voltage iswithin a low offset window.

FIG. 7 is a flow chart of a method 700 for operating the processingmodule 300 in sensing mode, according to an example. Although the methodis described in conjunction with the system described with respect toFIGS. 1-5, persons skilled in the art will understand that any systemconfigured to perform the method steps, in various technically feasiblealternative orders, falls within the scope of the present disclosure.

As shown, the method 700 starts at step 702, where processing system 110drives a sensor electrode 318 for capacitive sensing in a first period.At step 704, during the first period, calibration module 310 operates afirst side of a current-mode baseline system 301 according to a firstduration parameter (for example, N_DUR). At step 706, processing system110 drives a sensor electrode 318 for capacitive sensing in a secondperiod. At step 708, during the second period, calibration module 310operates a second side of the current-mode baseline system 301 accordingto a second duration parameter (for example, N_DUR).

Thus, the embodiments and examples set forth herein were presented inorder to best explain the present invention and its particularapplication and to thereby enable those skilled in the art to make anduse the invention. However, those skilled in the art will recognize thatthe foregoing description and examples have been presented for thepurposes of illustration and example only. The description as set forthis not intended to be exhaustive or to limit the invention to theprecise form disclosed.

What is claimed is:
 1. A processing system for calibrating current-modebaseline operations, the processing system comprising: a chargeintegrator coupled to a sensor electrode that is configured to be drivenwith a sensing signal for capacitive sensing during a cycle of thesensing signal, the charge integrator configured to output a common modevoltage that is based, at least in part, on output of the chargeintegrator over the cycle of the sensing signal; a baseline systemconfigured to apply an offset to the common mode voltage to correct forbaseline capacitance in the processing system, wherein the baselinesystem comprises a current mirror configured to apply the offset by:flowing first current to the charge integrator based, at least in part,on closure of a first switch, for a first duration during a first periodof the cycle of the sensing signal, and flowing second current to thecharge integrator based, at least in part, on closure of a secondswitch, for a second duration during a second period of the cycle of thesensing signal; and a calibration unit configured to determine valuesfor one or more of the first duration and the second duration at whichthe common mode voltage of the charge integrator is within a thresholdrange.
 2. The processing system of claim 1, wherein the calibration unitis configured to determine the values for the first duration and thesecond duration by: for each cycle of a plurality of cycles in which thesensor electrode is driven for capacitive sensing, varying one or moreof the first duration and the second duration; and identifying acombination of first duration and second duration for which the commonmode voltage is within the threshold range.
 3. The processing system ofclaim 2, wherein the calibration unit is configured to vary either ofthe first duration during the first period of the cycle or the secondduration during the second period of the cycle.
 4. The processing systemof claim 2, further comprising: a signal generator configured to drivethe sensor electrode for capacitive sensing a number of times for eachcombination of first duration and second duration, wherein thecalibration unit is further configured to determine the values for thefirst duration and the second duration by: for each cycle of theplurality of cycles, recording a count of a number of times that thecommon mode voltage is not within the threshold range, and identifying acombination of first duration and second duration for which anassociated count of the number of times that the common mode voltage isnot within the threshold range is lower than for any other combinationof first duration and second duration.
 5. The processing system of claim1, wherein the baseline system further comprises: a current conveyorconfigured to generate a reference current, wherein the first currentand the second current are based on the reference current.
 6. Theprocessing system of claim 1, wherein the baseline system is configuredto: flow the first current through a N-type metal-oxide-semiconductor(NMOS) transistor; and flow the second current through a a P-typemetal-oxide-semiconductor (PMOS) transistor.
 7. The processing system ofclaim 1, wherein: the calibration unit is configured to determine thecommon mode voltage by: sampling an output of the charge integratorduring the first period to determine a first sample; sampling the outputof the charge integrator during the second period to determine a secondsample; and calculating the common mode voltage based on averaging thefirst sample and the second sample.
 8. The processing system of claim 1,further comprising: a second charge integrator coupled to a secondsensor electrode that is configured to be driven with a second sensingsignal for capacitive sensing during a cycle of the second sensingsignal, the charge integrator configured to output a second common modevoltage that is based, at least in part, on the output of the secondcharge integrator over the cycle of the second sensing signal; and asecond current mirror configured to apply an offset to the common modevoltage to correct for baseline capacitance in the processing system by:flowing third current to the second charge integrator for the firstduration during a first period of a cycle of the second sensing signal,and flowing fourth current to the second charge integrator for thesecond duration during a second portion of the cycle of the secondsensing signal, wherein the calibration unit is configured to determinevalues for the first duration and the second duration based on thesecond common mode voltage of the second charge integrator and thecommon mode voltage of the first charge integrator.
 9. A method forcalibrating current-mode baseline operations, the method comprising:driving a sensor electrode coupled to a charge integrator with a sensingsignal to obtain a common mode voltage that is based, at least in part,on output of the charge integrator over a cycle of the sensing signal;applying an offset, by a current mirror, to the common mode voltage tocorrect for baseline capacitance by: flowing first current to the chargeintegrator for a first duration during a first period of the cycle ofthe sensing signal; and flowing second current to the charge integratorfor a second duration during a second period of the cycle of the sensingsignal; and determining values for one or more of the first duration andthe second duration at which the common mode voltage of the chargeintegrator is within a threshold range.
 10. The method of claim 9,wherein determining the values for the first duration and the secondduration comprises: for each cycle of a plurality of cycles in which thesensor electrode is driven for capacitive sensing, varying one or moreof the first duration and the second duration; and identifying acombination of first duration and second duration for which the commonmode voltage is within the threshold range.
 11. The method of claim 10,further comprising varying either of the first duration during the firstperiod of the cycle of the sensing signal or the second duration duringthe second period of the cycle.
 12. The processing system of claim 10,further comprising: driving the sensor electrode for capacitive sensinga number of times for each combination of first duration and secondduration, wherein determining the values for the first duration and thesecond duration comprises: for each cycle of the plurality of cycles,recording a count of a number of times that the common mode voltage isnot within the threshold range, and identifying a combination of firstduration and second duration for which an associated count of the numberof times that the common mode voltage is not within the threshold rangeis lower than for any other combination of first duration and secondduration.
 13. The method of claim 9, wherein: flowing the first currentcomprises closing a first switch of the current mirror to flow the firstcurrent to the charge integrator; and flowing the second currentcomprises closing a second switch of the current mirror to flow thesecond current to the charge integrator.
 14. The method of claim 13,further comprising: generating a reference current by a currentconveyor, wherein the first current and the second current are based onthe reference current generated by a current conveyor.
 15. The method ofclaim 13, wherein: flowing the first current comprises flowing the firstcurrent through a N-type metal-oxide-semiconductor (NMOS) transistor;and flowing the second current comprises flowing the second currentthrough a P-type metal-oxide-semiconductor (PMOS) transistor.
 16. Themethod of claim 9, further comprising: determining the common modevoltage by: sampling an output of the charge integrator during the firstperiod to determine a first sample; sampling the output of the chargeintegrator during the second period to determine a second sample; andcalculating the common mode voltage based on averaging the first sampleand the second sample.
 17. The method of claim 9, further comprising:driving a second sensor electrode coupled to a second charge integratorwith a second sensing signal to obtain a second common mode voltage thatis based, at least in part, on the output of the second chargeintegrator over a cycle of the second sensing signal; applying an offsetto the second common mode voltage to correct for baseline capacitanceby: flowing third current to the second charge integrator for the firstduration during a first period of the cycle of the second sensingsignal; and flowing fourth current to the second charge integrator forthe second duration during a second portion of the cycle of the secondsensing signal; and determining values for the first duration and thesecond duration based, at least in part, on the second common modevoltage of the second charge integrator and the common mode voltage ofthe first charge integrator.
 18. An input device, comprising: aplurality of sensor electrodes configured to be driven with a sensingsignal for capacitive sensing during a cycle of sensing signal; and aprocessing system including: a charge integrator coupled to a sensorelectrode of the plurality of sensor electrodes configured to output acommon mode voltage that is based, at least in part, on the output ofthe charge integrator over the cycle of the sensing signal; a baselinesystem configured to apply an offset to the common mode voltage tocorrect for baseline capacitance, wherein the baseline system comprisesa current mirror configured to apply the offset by: flowing firstcurrent to the charge integrator for a first duration during a firstperiod of the cycle of the sensing signal, and flowing second current tothe charge integrator for a second duration during a second period ofthe cycle of the sensing signal; and a calibration unit configured todetermine values for one or more of the first duration and the secondduration at which the common mode voltage of the charge integrator iswithin a threshold range.
 19. The input device of claim 18, wherein thecalibration unit is configured to determine the values for the firstduration and the second duration by: for each cycle of a plurality ofcycles in which the sensor electrode is driven for capacitive sensing,varying one or more of the first duration and the second duration; andidentifying a combination of first duration and second duration forwhich the common mode voltage is within the threshold range.